HAL HRTIM callbacks irq and Callbacks functions ¶
This section provides information about the HAL HRTIM callbacks register/unregister functions migration.
Callback for burst DMA transfer completion. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_BurstDMATransferCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
|
void HAL_HRTIM_DMACpltCallback(hal_hrtim_handle_t *hhrtim,
uint32_t timer);
|
Callback for burst mode period event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_BurstModePeriodCallback(HRTIM_HandleTypeDef *hhrtim);
|
void HAL_HRTIM_BurstModePeriodCallback(hal_hrtim_handle_t *hhrtim);
|
Callback for capture event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_Capture1EventCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
void HAL_HRTIM_Capture2EventCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
|
void HAL_HRTIM_CaptureCallback(hal_hrtim_handle_t *hhrtim,
uint32_t timer,
hal_hrtim_capture_unit_t capture_unit);
|
Callback for compare event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_Compare1EventCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
void HAL_HRTIM_Compare2EventCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
void HAL_HRTIM_Compare3EventCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
void HAL_HRTIM_Compare4EventCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
|
void HAL_HRTIM_CompareMatchCallback(hal_hrtim_handle_t *hhrtim,
uint32_t timer,
hal_hrtim_compare_unit_t compare_unit);
|
Callback for counter reset event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_CounterResetCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
|
void HAL_HRTIM_ResetCallback(hal_hrtim_handle_t *hhrtim,
uint32_t timer);
|
Callback when DLL calibration is ready. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_DLLCalibrationReadyCallback(HRTIM_HandleTypeDef *hhrtim);
|
void HAL_HRTIM_DLLCalibrationCallback(hal_hrtim_handle_t *hhrtim);
|
Callback for delayed protection event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_DelayedProtectionCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
|
void HAL_HRTIM_DelayedProtectionCallback(hal_hrtim_handle_t *hhrtim,
uint32_t timer);
|
Callback for HRTIM error. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_ErrorCallback(HRTIM_HandleTypeDef *hhrtim);
|
void HAL_HRTIM_DMAErrorCallback(hal_hrtim_handle_t *hhrtim,
uint32_t timer);
|
Callback for fault event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_Fault1Callback(HRTIM_HandleTypeDef *hhrtim);
void HAL_HRTIM_Fault2Callback(HRTIM_HandleTypeDef *hhrtim);
void HAL_HRTIM_Fault3Callback(HRTIM_HandleTypeDef *hhrtim);
void HAL_HRTIM_Fault4Callback(HRTIM_HandleTypeDef *hhrtim);
void HAL_HRTIM_Fault5Callback(HRTIM_HandleTypeDef *hhrtim);
void HAL_HRTIM_Fault6Callback(HRTIM_HandleTypeDef *hhrtim);
|
void HAL_HRTIM_FaultCallback(hal_hrtim_handle_t *hhrtim,
uint32_t fault);
|
Callback for output reset event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_Output1ResetCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
void HAL_HRTIM_Output2ResetCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
|
void HAL_HRTIM_OutputResetCallback(hal_hrtim_handle_t *hhrtim,
uint32_t output);
|
Callback for output set event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_Output1SetCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
void HAL_HRTIM_Output2SetCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
|
void HAL_HRTIM_OutputSetCallback(hal_hrtim_handle_t *hhrtim,
uint32_t output);
|
Callback for repetition event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_RepetitionEventCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
|
void HAL_HRTIM_RepetitionCallback(hal_hrtim_handle_t *hhrtim,
uint32_t timer);
|
Callback for update event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_RegistersUpdateCallback(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
|
void HAL_HRTIM_UpdateCallback(hal_hrtim_handle_t *hhrtim,
uint32_t timer);
|
Callback for synchronization event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_SynchronizationEventCallback(HRTIM_HandleTypeDef *hhrtim);
|
void HAL_HRTIM_SynchroCallback(hal_hrtim_handle_t *hhrtim);
|
Callback for system fault event. ¶
|
HAL1 |
HAL2 |
|---|---|
void HAL_HRTIM_SystemFaultCallback(HRTIM_HandleTypeDef *hhrtim);
|
void HAL_HRTIM_SystemFaultCallback(hal_hrtim_handle_t *hhrtim);
|
HAL HRTIM Register Callbacks functions ¶
|
HAL1 |
HAL2 |
|---|---|
|
In HAL1, the function
|
In HAL2, separate functions are available to register each specific callback, providing more granularity and control over the callback registration process. |
|
For example HAL_HRTIM_RegisterCallback(&HRTIM_HANDLE,
HAL_HRTIM_SYSTEMFAULTCALLBACK_CB_ID,
USER_HRTIM_SystemFaultCallback);
HAL_HRTIM_TIMxRegisterCallback(&HRTIM_HANDLE,
HAL_HRTIM_OUTPUT1SETCALLBACK_CB_ID,
USER_HRTIM_TIM_Output1SetCallback)
|
HAL_HRTIM_RegisterSystemFaultCallback(&HRTIM_HANDLE,
USER_HRTIM_SystemFaultCallback);
HAL_HRTIM_RegisterOutputSetCallback(&HRTIM_HANDLE,
USER_HRTIM_TIM_Output1SetCallback);
|
HAL HRTIM and TIMER UnRegister Callbacks functions ¶
|
HAL1 |
HAL2 |
|---|---|
|
In HAL1, the functions
|
In HAL2, the unregister callback API has been removed. Instead, callbacks can be managed by re-registering the default HAL HRTIM weak callbacks as needed. |
|
For example HAL_HRTIM_UnRegisterCallback(&HRTIM_HANDLE,
HAL_HRTIM_SYSTEMFAULTCALLBACK_CB_ID);
HAL_HRTIM_TIMxUnRegisterCallback(&HRTIM_HANDLE,
HAL_HRTIM_OUTPUT1SETCALLBACK_CB_ID)
|
HAL_HRTIM_RegisterSystemFaultCallback(&HRTIM_HANDLE,
HAL_HRTIM_SystemFaultCallback);
HAL_HRTIM_RegisterOutputSetCallback(&HRTIM_HANDLE,
HAL_HRTIM_OutputSetCallback);
|
HAL HRTIM IRQ Handler ¶
|
HAL1 |
HAL2 |
|---|---|
|
In HAL1, a single IRQ handler function is used for all HRTIM interrupts, with the specific timer identified by a parameter. |
In HAL2, dedicated IRQ handler functions are provided for each HRTIM timer and fault event. |
void HAL_HRTIM_IRQHandler(HRTIM_HandleTypeDef *hhrtim,
uint32_t TimerIdx);
|
void HAL_HRTIM_M_IRQHandler(hal_hrtim_handle_t *hhrtim);
void HAL_HRTIM_TIMA_IRQHandler(hal_hrtim_handle_t *hhrtim);
void HAL_HRTIM_TIMB_IRQHandler(hal_hrtim_handle_t *hhrtim);
void HAL_HRTIM_TIMC_IRQHandler(hal_hrtim_handle_t *hhrtim);
void HAL_HRTIM_TIMD_IRQHandler(hal_hrtim_handle_t *hhrtim);
void HAL_HRTIM_TIME_IRQHandler(hal_hrtim_handle_t *hhrtim);
void HAL_HRTIM_TIMF_IRQHandler(hal_hrtim_handle_t *hhrtim);
void HAL_HRTIM_FLT_IRQHandler(hal_hrtim_handle_t *hhrtim);
|
Related concept: